package com.bjshiwei.zhengu.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * 作者：Administrator on 2016/9/30 0030 16:17
 * 邮箱：sanjins@126.com
 */


public class StrateVPAdapter extends FragmentPagerAdapter {
    private List<Fragment> mFragments;
    public StrateVPAdapter(FragmentManager fm, List<Fragment> fragments) {
        super(fm);
        mFragments=fragments;
    }

    @Override
    public Fragment getItem(int position) {
        return mFragments.get(position);
    }

    @Override
    public int getCount() {
        return mFragments==null?0:mFragments.size();
    }

}
